package com._520it.crm.service.impl;

import com._520it.crm.domain.Client;
import com._520it.crm.domain.ClientReport;
import com._520it.crm.domain.TransferRecord;
import com._520it.crm.mapper.ClientMapper;
import com._520it.crm.mapper.ClientReportMapper;
import com._520it.crm.mapper.TransferRecordMapper;
import com._520it.crm.page.PageResult;
import com._520it.crm.query.QueryObject;
import com._520it.crm.service.IClientReportService;
import com._520it.crm.service.ITransferRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.swing.*;
import java.util.Collections;
import java.util.Date;
import java.util.List;

@Service
public class ClientReportServiceImpl implements IClientReportService{
    @Autowired
    ClientReportMapper clientReportMapper;


    @Override
    public PageResult query(QueryObject qo) {
        Integer totalCount =  clientReportMapper.queryforCount(qo);
        if (totalCount==0){
            return new PageResult(0, Collections.EMPTY_LIST);
        }
        List<ClientReport> data =  clientReportMapper.queryforList(qo);
        return new PageResult(totalCount,data);
    }


}
